package web;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import model.Dealer;
import model.Game;
import model.Player;
import model.RankCardSet;
//import model.Table;

public class MyServletContextListener implements ServletContextListener {

	@Override
	public void contextDestroyed(ServletContextEvent event) {
		
	}

	@Override
	public void contextInitialized(ServletContextEvent event) {
		ServletContext sc = event.getServletContext();
		
		Player[] playerList = new Player[9];
		sc.setAttribute("playerList", playerList);
		
		Game game = new Game();
		sc.setAttribute("game", game);
		
		Dealer dealer = new Dealer();
		sc.setAttribute("dealer", dealer);
		
		RankCardSet rankCardSet = new RankCardSet();
		sc.setAttribute("rankCardSet", rankCardSet);
	}
}
